import request from '@/utils/request'

export default {
  // 带条件分页查询讲师列表
  getTeacherPageVo(current, limit, teacherQuery) {
    return request({
      url: `/eduservice/edu-teacher/getTeacherPageVo/${current}/${limit}`,
      method: 'post',
      data: teacherQuery // 转化json传递
    })
  },
  // 根据id删除讲师
  delTeacher(id) {
    return request({
      url: `/eduservice/edu-teacher/${id}`,
      method: 'delete'
    })
  },
  // 添加讲师
  addTeacher(eduTeacher) {
    return request({
      url: `/eduservice/edu-teacher/addTeacher`,
      method: 'post',
      data: eduTeacher // 转化json传递
    })
  },
  // 根据id查询讲师
  getTeacherById(id) {
    return request({
      url: `/eduservice/edu-teacher/getTeacherById/${id}`,
      method: 'get'
    })
  },
  // 修改讲师
  updateTeacher(eduTeacher) {
    return request({
      url: `/eduservice/edu-teacher/updateTeacher`,
      method: 'post',
      data: eduTeacher // 转化json传递
    })
  },
  // 获取所有讲师列表
  getAllTeacher() {
    return request({
      url: `/eduservice/edu-teacher`,
      method: 'get'
    })
  }

}
